package com.example;

import com.restt.config.RibbonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 消费者启动类
 *
 * @author sunhui
 */
@SpringBootApplication
@EnableEurekaClient
@RibbonClients(value = {
        @RibbonClient(name = "CLOUD-ADMIN-PROVIDER-PRODUCT-HYSTRIX", configuration = RibbonConfig.class),
        @RibbonClient(name = "CLOUD-ADMIN-ZUUL-GATEWAY", configuration = RibbonConfig.class)
})
@EnableFeignClients("com.example.service")
public class ConsumerHystrixApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConsumerHystrixApplication.class, args);
    }

}
